$(document).ready(function() {
    $.getJSON("/file/getFiles", function (data) {
        htmlStr = "<thead><tr class=&quot;text-c&quot;><th width=&quot;50&quot;>编号</th>" +
            "<th width=&quot;150&quot;>文件名称</th>" +
            "<th width=&quot;50&quot;>上传日期</th>" +
            "</tr></thead>";
        $.each(data, function (infoindex, info) {
            var create_time = new Date(info["upload_time"]).toLocaleDateString();
            htmlStr += "<tbody><tr class=&quot;text-c&quot;>";
            htmlStr += "<td>" + (infoindex + 1) + "</td>";
            htmlStr += "<td>" + info["file_name"] + "</td>";
            htmlStr += "<td>" + create_time + "</td>";
            htmlStr += "</tr></tbody>"
        })
        $("#table").html(htmlStr);
    });
})